<div mt-layout="{ spacing_open: 0, west__size: 300 }" style="width: 100%; height: 100%;">

<div class="ui-layout-west" style="padding: 0" mt-layout="{ spacing_open: 0 }" ng-controller="myGroupTreeController">
	<div class="ui-layout-center" style="padding: 0">
		<div class="fuelux" mt-url="tmpl/groupTree.html"></div>
	</div>
	<div class="ui-layout-south">
		<button class="btn btn-success" href="#creategroup" aria-controls="creategroup" role="tab" data-toggle="tab"
                mt-tab>新建层级</button>
		<button class="btn btn-primary" href="#modifygroup" aria-controls="modifygroup" role="tab" data-toggle="tab"
           mt-tab ng-disabled="!selectedGroup">修改层级</button>
		<button class="btn btn-danger" href="#deletegroup" aria-controls="deletegroup" data-toggle="modal"
           ng-disabled="!selectedGroup">删除层级</button>
	</div>
</div>
<div class="ui-layout-center">
	<!--<div ng-controller="pushdataController">-->
		<!--<button style="float: right;" class="btn btn-primary" ng-click="pushingdata()">推送数据</button>-->
	<!--</div>-->
	<!-- Nav tabs -->
	<ul class="nav nav-tabs hidden" role="tablist">
        <li role="presentation" class="active"><a href="#helptab" aria-controls="helptab" role="tab" data-toggle="tab" mt-tab>帮助</a></li>
		<li role="presentation"><a href="#groupusertab" aria-controls="groupusertab" role="tab" data-toggle="tab" mt-tab>用户列表</a></li>
		<li role="presentation"><a href="#creategroup" aria-controls="creategroup" role="tab" data-toggle="tab">新建层级</a></li>
		<li role="presentation"><a href="#modifygroup" aria-controls="modifygroup" role="tab" data-toggle="tab">修改层级</a></li>
		<li role="presentation"><a href="#addusertab" aria-controls="addusertab" role="tab" data-toggle="tab">添加用户</a></li>
	</ul>

	<!-- Tab panes -->
	<div class="tab-content">
        <div role="tabpanel" class="tab-pane fade active in" id="helptab">请选择用户组</div>
		<div role="tabpanel" class="tab-pane fade" id="groupusertab" mt-layout="{ spacing_open: 0 }" ng-controller="myGroupUserTableController">
			<div class="ui-layout-north">
				<div style="text-align: right;">
					<ol class="breadcrumb">
						<li>用户和权限</li>
						<li><a href="../../user/group">用户层级管理</a></li>
						<li class="active">用户列表</li>
					</ol>
				</div>
			</div>
			<div class="ui-layout-center" mt-url="tmpl/groupUsersTable.html"></div>
			<div class="ui-layout-south">
				<button class="btn btn-primary" ng-click="saveuserlist()">保存用户</button>
				<button class="btn btn-primary "  ng-click="setMenus()">菜单配置</button>
			</div>
		</div>
		<div role="tabpanel" class="tab-pane fade" id="creategroup" ng-controller="createGroupController">
			<div style="text-align: right;">
				<ol class="breadcrumb">
					<li>用户和权限</li>
					<li><a href="../../user/group">用户层级管理</a></li>
					<li class="active">新建层级</li>
				</ol>
			</div>

			<div mt-url="tmpl/groupForm.html"></div>
		</div>
		<div role="tabpanel" class="tab-pane fade" id="modifygroup" ng-controller="modifyGroupController">
			<div style="text-align: right;">
				<ol class="breadcrumb">
					<li>用户和权限</li>
					<li><a href="../../user/group">用户层级管理</a></li>
					<li class="active">修改层级</li>
				</ol>
			</div>

			<div mt-url="tmpl/groupForm.html"></div>
		</div>
		<div role="tabpanel" class="tab-pane fade" id="addusertab"
             mt-layout="{ spacing_open: 0 }" ng-controller="addGroupUsersController">
			<div class="ui-layout-north">
				<div style="text-align: right;">
					<ol class="breadcrumb">
						<li>用户和权限</li>
						<li><a href="../../user/group">用户层级管理</a></li>
						<li class="active">添加用户</li>
					</ol>
				</div>

			</div>
			<div class="ui-layout-center" mt-url="tmpl/candidateUsersTable.html"></div>
			<div class="ui-layout-south">
				<button class="btn btn-primary" data-target="#groupusertab" aria-controls="groupusertab" role="tab" data-toggle="tab"
                        ng-disabled="!selectedAddUsers.length" ng-click="ok()" mt-tab>添加</button>&nbsp;
				<button class="btn btn-primary" href="#groupusertab" aria-controls="groupusertab"
                   data-toggle="tab">返回</button>
			</div>
		</div>
	</div>
</div>
</div>
<div mt-url="tmpl/deleteGroupDlg.html" ng-controller="deleteGroupController"></div>
<div mt-url="tmpl/removeGroupUsersDlg.html" ng-controller="removeGroupUsersController"></div>
<!-- Modal -->
<div  ng-controller="menuTreeController" class="modal fade" id="menuTreeModal" mt-modal modal-bs-shown="modalShown($event)"  tabindex="-1" role="dialog" aria-labelledby="menuTreeModal">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabe">角色：{{roleName}}  菜单权限：</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal">
					<div class="bet">
						<!-- <div class="col-sm-3 col-sm-offset-2" id="col1">
                            <label class="control-label" for="input1" id="controlLabel1" style="font-size: 14px;text-align: right;">搜索:</label>
                        </div>
                        <div class="col-sm-5" id="col2">
                            <input class="form-control" id="input1" name="project_name" ng-model="project_name">
                        </div> -->
						<div class="col-sm-8 col-sm-offset-2" index="2" style="float: none;">
							<ul mt-ztree="option" ztree-init="ztree.init($event)"
								ng-model="ztree.sel" class="ztree" ></ul>
						</div>

					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" data-dismiss="modal" data-toggle="modal"  ng-click="ok()">确定</button>
				<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">取消</button>
			</div>
		</div>
	</div>
</div>
